
setInterval(function () {
    let hour=new Date().getHours();
    let minute=new Date().getMinutes();
    let second=new Date().getSeconds();
    second=60-second;
    if(second>0&&minute!==60){
        minute=59-minute;
    }else if(minute===60)
    {
        minute = 0;
    }if(minute>0&&hour!==24){
        hour=23-hour;
    }else if(hour===24){
        hour=0;
    }
    if(second<10){
        second='0'+second;
    }
    if(minute<10){
        minute='0'+minute;
    }
    if(hour<10){
        hour='0'+hour;
    }
    document.getElementById('mi-hour').innerHTML=hour;
    document.getElementById('mi-minute').innerText=minute;
    document.getElementById('mi-second').innerText=second;
},1000)

layui.use('carousel', function () {
    var carousel = layui.carousel;
    //***************************建造实例
    var ins=carousel.render({
        elem: '#test1'
        , width: '978px'     //设置容器宽度
        ,height:'350px'
        , arrow: 'hover'    //始终显示箭头，可选hover,none
        //,anim: 'updown'    //切换动画方式，可选fade,default
        , full: false        //全屏
        , autoplay: true    //自动切换
        , interval: 1000     //自动切换的时间间隔
        , index: 0          //初始化时item索引,默认时0
        , indicator:'none' //指示器位置，可选outside,none
    });
});